ForResource()

Shift & Break System Function

Syntax samples

FORRESOURCE()

IF FORRESOURCE() THEN GET Res1

Description

This function returns TRUE if the object executing the shift or break logic is a resource.

Valid In

All Shift or Break logic.

Example

A shift called DAYS.SFT has five resources and eight locations assigned to it. When the resources go off-shift, it is desired to write the resource name and simulation time to a file called RES_TIME. The following logic is placed in the off-shift logic.

IF FORRESOURCE() THEN

BEGIN

XWRITE res_time, "Shift for" $ RES(Resource()) $ "ended at" $ Clock(hr) $ "."

END

See Also

FORLOCATION(). Also see Shift & Break Logic.